/**
 * Created by DELL on 2017/5/11.
 */
var rewardId=common.getQueryString("rewardId");
$("#rewardId").val(rewardId);
/**
 * 中介联系人 列表初始化设置
 * @type {Object}
 */
var settings = {
    "sAjaxSource": window.globalHost + common.visitRecordList,
    "aoColumns": [{
        "mDataProp": function(obj) {
            return obj.contractNo?obj.contractNo:"无编号";
        },
        "sTitle": "签约合同编号",
        "sDefaultContent": "",
        "sClass": "text-center"
    },{
        "mDataProp": function(obj) {
            return obj.rewardStatus?enumObject.enumJsonData["rewardStatus"][obj.rewardStatus]:"无状态";
        },
        "sTitle": "悬赏状态",
        "sDefaultContent": "",
        "sClass": "text-center"
    },{
        "mDataProp": function(obj) {
            return obj.houseAddress?obj.houseAddress:"无信息";
        },
        "sTitle": "房源地址",
        "sDefaultContent": ""
    },{
        "mDataProp": function(obj) {
            return (obj.agentName?obj.agentName:"无经纪人")+"<br/>"+(obj.mobile?obj.mobile:"无经纪人电话");
        },
        "sTitle": "经纪人/手机号码",
        "sDefaultContent": ""
    },{
        "mDataProp": function(obj) {
            return (obj.companyName?obj.companyName:"无中介公司")+"<br/>"+(obj.storeName?obj.storeName:"无中介门店");
        },
        "sTitle": "中介公司名称/门店",
        "sDefaultContent": "",
        "sClass":"text-center"
    }, {
        "mDataProp": "createTime",
        "sTitle": "创建时间",
        "sDefaultContent": ""
    }],
    "fnServerParams": function(aoData) {
        return common.getSearchData("form.data-list-search",aoData);
    }
};
var options = $.extend(true, {}, _dataTableSettings, settings);
/**
 * 实例化 中介联系人 列表插件
 * @type {[type]}
 */
var $currentDataTable=$("#data-list");
var oTable = $currentDataTable.dataTable(options);
searchList.getDataList(oTable);
searchList.resetSearch(oTable);